<form id="pagerForm" action="__URL__/index" method="post">
    <include file="Public/pagerForm" />
    <input type="hidden" name="pid" value="{$parameter['pid']}"/>
</form>
<style>tr td,th{text-align:center}.typestyle{padding: 2px 6px;font-size: 13px;color: #fff;border-radius: 4px;}</style>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="__URL__/index/" method="post">
    	<input type="hidden" name="pid" value="{$parameter['pid']}"/>
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td></td>
                </tr>
            </table>
            <div class="subBar">
                <!--ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">检索</button>
                            </div>
                        </div>
                    </li>
                </ul-->
            </div>
        </div>
    </form>
</div>

<div class="pageContent">
    <div class="panelBar" style="background:none;">
        <ul class="toolBar">
            <li>
                <a href="{:U('Link/add/',array('type'=>$type,'model'=>$parameter['model'],'pid'=>$parameter['pid']))}" class="add" rel="add" target="dialog" title="添加广告图">
                    <i class="iconfont">&#xe601;</i>
                    <span>添加</span>
                </a>
            </li>

            <li>
                <a href="{:U('Link/edit',array('model'=>$parameter['model']),'','')}/id/{sid_user}" class="edit" rel="edit" target="dialog" title="编辑幻灯片">
                    <i class="iconfont">&#xe625;</i>
                    <span>编辑</span>
                </a>
            </li>

            <li>
                <a class="delete" href="{:U('Link/remove',array('model'=>$parameter['model']))}" target="selectedTodo" rel="id" posttype="string" title="你确定要批量删除吗？">
                    <i class="iconfont">&#xe611;</i>
                    <span>删除</span>
                </a>
            </li>

        </ul>
    </div>
    <table class="table" width="100%" layoutH="206">
        <thead>
            <tr>
                <th width="3%" class="txtMid">
                    <input type="checkbox" group="id" class="checkboxCtrl">
                </th>
                <th width="5%">编号</th>
                <th width="20%">标题</th>
                <th width="10%">图片</th>
                <th width="20%">链接地址</th>
                <th width="10%">创建时间</th>
	            <th width="5%">排序</th>
	            <th width="5%">状态</th>
	            <th width="10%">操作</th>
            </tr>
        </thead>
        <tbody>
        <if condition="$dataList|count gt 0">
        <volist name="dataList" id="volist">
            <tr target="sid_user" rel="{$volist['id']}" >
                <td class="txtMid">
                    <input name="id" value="{$volist['id']}" type="checkbox">
                </td>
                <td>{:( $page['pageNum'] - 1 ) * $page['numperpage'] + ( $key + 1 )}</td>
                <td>
                    <a href="{:U('Link/edit',array('model'=>$parameter['model'],'id'=>$volist['id']))}" class="alink1" target="dialog" title='编辑幻灯片'>
                        {$volist['title']}
                    </a>
                </td>
                <td>
                	<a href="__ROOT__{$volist['picture']}"  target="_blank" rel="example_group" >
                        <img src="__ROOT__{$volist['picture']}" style="max-height: 50px;"/>
                    </a>
                </td>
                <td>{$volist['link']}</td>
                <td>{$volist['create_time']|date='Y-m-d H:i:s',###}</td>
                <td>{$volist['sort']}</td>
                <td>
                    <if condition="$volist['status'] eq 0">
						<span class="typestyle" style="line-height:60px;background-color:#90EE90;">显示</span>
                    <else />
                    	<span class="typestyle" style="line-height:60px;background-color:#EE3B3B;">隐藏</span>
                    </if>
                </td>
                <td>
					<if condition="$volist['status'] eq 1">
						<a href="{:U('Link/commSetStatus',array('model'=>$parameter['model'],'param'=>'status-0','id'=>$volist['id']))}" target="ajaxTodo" class="color_red">[恢复]</a>
					<else />
						<a href="{:U('Link/commSetStatus',array('model'=>$parameter['model'],'param'=>'status-1','id'=>$volist['id']))}" target="ajaxTodo" class="alink1">[禁用]</a>
					</if>
                </td>
            </tr>
        </volist>
        <else />
            <tr><td colspan="10" style="text-align:center;">没有数据!!!</td></tr>
        </if>
        </tbody>
    </table>
    <include file="Public/pagination" />
</div>